<extend name="Common/list-tree" />

<block name="batch">
<div class="input-group">
    <span class="text-icon"> 批 量 </span>
    <select name="batch">
        <option value="sort">排序</option>
    </select>
</div>
</block>

<block name="list">
    <tr>
        <th width="50" class="tc">排序</th>
        <th>栏目</th>
        <th width="100" class="tc">标识</th>
        <th width="50" class="tc">序号</th>
        <th width="100" class="tc">模型</th>
        <th width="50" class="tc">类型</th>
        <th width="50" class="tc">状态</th>
        <th width="300">操作</th>
    </tr>
    <foreach name="list" item="v">
    <tr id="{$v.id}" pId="{$v.pid}" <eq name="v.is_menu" value="1">class="blue"</eq> >
        <td class="tc"><input class="tc" type="text" name="sort[{$v.id}]" value="{$v.sort}" size="1"></td>
        <td>{$v.title}</td>
        <td class="tc">{$v.name}</td>
        <td class="tc">{$v.id}</td>
        <td class="tc">{$model[$v['mid']]}</td>
        <td class="tc">{:int_str($v['is_menu'],'1:目录,0:栏目')}</td>
        <td class="tc">{:int_str($v['status'],'0:false,1:true')}</td>
        <td>
            <eq name="v.is_menu" value="1">
            <a class="AjaxHtml btn btn-green mrt10" data-url="{:U('add',array('pid'=>$v['id'],'mid'=>$v['mid']))}" href="javascript:;">添加子栏目</a>
            </eq>
            <a class="AjaxHtml btn btn-blue mrt10" data-url="{:U('edit?id='.$v['id'])}" href="javascript:;">编辑栏目</a>
            <a class="AjaxConfirm btn btn-red mrt10" data-url="{:U('del?id='.$v['id'])}" href="javascript:;">删除栏目</a>
        </td>
    </tr>
    </foreach>
</block>